<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="sf"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->

<!-- Bootstrap -->
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/resource/css/bootstrap.min.css">
<link rel="stylesheet"
	href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]-->
<script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<!--[endif]-->
<title></title>
</head>
<body>
	<div class="tab-pane" role="tabpanel" id="#management">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">修改产品信息</h3>
			</div>
			<div class="panel-body">
				<div class="container-fluid">
					<sf:form class="form-horizontal" method="post"
						modelAttribute="product" action="home?new">
							<sf:input class="form-control" type="hidden"
							placeholder="${product.id}" path="id" />
						<sf:input class="form-control" type="hidden"
							placeholder="${product.version}" path="version" />
						<div class="form-group">
							<label for="order" class="control-label col-lg-2">排序</label>
							<div class="col-lg-9">
								<sf:input path="order" class="form-control" type="text"
									id="order" />
							</div>
						</div>
						<div class="form-group">
							<label for="pName" class="control-label col-lg-2">名称</label>
							<div class="col-lg-9">
								<sf:input path="pName" class="form-control" type="text"
									id="pName" />
							</div>
						</div>
						<div class="form-group">
							<label for="pPrice" class="control-label col-lg-2">价格</label>
							<div class="col-lg-9">
								<sf:input path="pPrice" class="form-control" type="text"
									id="pPrice" />
							</div>
						</div>
						<div class="form-group row">
							<label class="control-label col-lg-2">类别</label>
							<div class="col-lg-4">
								<select class="form-control" id="firstName">
									<option value="">请选择一级类别</option>
									<c:forEach items="${firstTypeList}" var="fl">
										<option value="${fl.id}">${fl.typeName}</option>
									</c:forEach>
								</select>
							</div>
							<div class="col-lg-4 col-lg-offset-1">
								<select class="form-control" id="secondName" name="secondName">
									<option value="">请选择二级类别</option>
									<c:forEach items="${secondTypeList}" var="sl">
										<option value="${sl.id}">${sl.typeName}</option>
									</c:forEach>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label for="notes" class="control-label col-lg-2">备注</label>
							<div class="col-lg-9">
								<sf:textarea path="notes" class="form-control" id="notes" />
							</div>
						</div>
						<div class="form-control-static col-lg-3 col-lg-offset-5">
							<input type="submit" class="btn btn-success btn-lg" value="提交">
						</div>
					</sf:form>
				</div>
			</div>
		</div>
	</div>

	<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
	<script
		src="${pageContext.request.contextPath}/resource/js/jquery.min.js"></script>
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script
		src="${pageContext.request.contextPath}/resource/js/bootstrap.min.js"></script>
</body>
</html>